import Vue from 'vue'
import Vuex from 'vuex'
import config from './config'
import asyncGetRouter from './asyncGetRouter'
import ShowMenu from './ShowMenu'
import User from './User'
import queryTasksAccordingToPlan from './queryTasksAccordingToPlan'
import queryPlanAccordingToTheTask from './queryPlanAccordingToTheTask'
import Map from './Map'
import getTreeData from './getTreeData'
import currentTask from './currentTask'
import taskmodel from './taskmodel'
import createPersistedState from "vuex-persistedstate"

Vue.use(Vuex)

export default new Vuex.Store({
	state:{
		originlandProduct:[]
	},
	mutations:{
        setlandProduct(state,item){
			state.originlandProduct = item
		},
	},
	modules: {
		config,
		asyncGetRouter,
		ShowMenu,
		User,
		queryTasksAccordingToPlan,
		queryPlanAccordingToTheTask,
		Map,
		getTreeData,
		currentTask,
		taskmodel
	},
	plugins: [createPersistedState()]
})
